<cfparam default="none" name="url.SCFStep1" />
<cfparam default="none" name="url.SCFStep2" />
<cfparam default="none" name="url.SCFStep3" />
<cfparam default="none" name="url.SCFStep4" />
<cfparam default="none" name="url.SCFStep5" />
<cfparam default="none" name="url.SCFStep6" />
<cfparam default="none" name="url.DisableUser" />

<!---NonSCF--->
<cfparam default="none" name="url.NonSCFStep1" />
<cfparam default="none" name="url.NonSCFStep1" />
<cfparam default="none" name="url.NonSCFADAccount" />
<cfparam default="none" name="url.NonSCFStep5" />
<cfparam default="none" name="url.NonSCFStep6" />


<!--- SCFStep1 --->
<cfif url.SCFStep1 eq "add">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                TermRequest = EntityNew("TerminationRequests");
                TermRequest.setTermDate( FORM.Term );
                TermRequest.setRosettaID( FORM.RosettaID );
                TermRequest.setEmpStatusIDNo( FORM.EmpStatusIDNo );
                TermRequest.setEmpStatusReasonCode( FORM.EmpStatusReasonCode );
                TermRequest.setOrgCodeIDNo( 117 );
                TermRequest.setNonSCF( 0 );
                TermRequest.setRehireElig( 1 );
                TermRequest.setTermTypeID( FORM.TermTypeID );
                TermRequest.setCOBRAEndOfMonth( dateformat(dateadd('d',-1, dateadd('m',1,(Month(FORM.Term) & '/1/' & Year(FORM.Term)))),'mm/dd/yyyy') );
                TermRequest.setSysTermDate(  DateFormat(dateadd('ww',2, FORM.Term), 'mm/dd/yyyy') );
                EntitySave(TermRequest, true);
            </cfscript>
            
            <cfif FORM.FILEUPLOAD NEQ "">
                <cffile action='upload' filefield='FileUpload' destination='#FORM.Directory#' nameconflict='makeunique' />
                <cfscript>
                    AddFile = EntityNew("FileLibrary");
                    AddFile.setEmployeeID(FORM.RosettaID);
                    AddFile.setDateLoaded(now());
                    AddFile.setTermReqID( TermRequest.getTerminationRequestsID() );
                    AddFile.setFileName( '#cffile.ServerFile#' );
                    AddFile.setFileTypeID( Form.FileTypeID );
                    AddFile.setLoadedBy( Session.UserRosettaID );
                    EntitySave( AddFile, true );
                </cfscript>
            </cfif>
            
            <cfscript>            
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(18);
                stepAction.setTermReqID( TermRequest.getTerminationRequestsID() );
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setCreationTimeStamp( now() );
                stepAction.setNotes( replace(trim(FORM.Comments), "'", "''", "all") );
                stepAction.setActTimeStamp( DateFormat(now(), 'mm/dd/yyyy'));
                EntitySave(stepAction, true);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(20);
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setTermReqID( TermRequest.getTerminationRequestsID() );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);

                EmployeeName = CreateObject("component", session.rootDir & ".DatabaseQueries.Kronos").funcGetCurrentEmployees( val(FORM.RosettaID) );
                EmployeeName = EmployeeName.FirstName & " " & EmployeeName.LastName;
                Session.StepConfirmation = 'The request for termination of the employee ';
                Session.StepConfirmation &= EmployeeName;
                Session.StepConfirmation &= " has been successfully submitted to HR.  Thank you for using E-PAR. <p>Initiate another request?  Click <a href='/#Session.RootDir#/termination/SCF/Step1-Request.cfm'>Here</a>";
                location("confirmation.cfm?Termination=True");
            </cfscript>
            
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep1 --->


<!--- SCFStep2 --->
<cfif url.SCFStep2 eq "update">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                TermRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID );
                TermRequest.setTermDate( FORM.TermDate );
                TermRequest.setRosettaID( FORM.RosettaID );
                TermRequest.setEmpStatusIDNo( FORM.EmpStatusIDNo );
                TermRequest.setEmpStatusReasonCode( FORM.EmpStatusReasonCode );
                TermRequest.setOrgCodeIDNo( 117 );
                TermRequest.setRehireElig( ( isDefined('FORM.RehireElig') ? 1 : 0) );
                TermRequest.setTermTypeID( FORM.TermTypeID );
                TermRequest.setSysTermDate( FORM.SysTermDate );
                EntitySave( TermRequest);
                Session.TermReqID = FORM.TermReqID;
                location("/#Session.rootDir#/termination/SCF/Step2-HRConfirmRequest.cfm?TermReqID=#FORM.TermReqID#", false);
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep2 --->


<!--- SCFStep2 --->
<cfif url.SCFStep2 eq "confirm">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                TermRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID);
                Session.TermReqID = FORM.TermReqID;
                
                stepAction = entityLoadByPK("StepActions", FORM.StepID);
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setNotes( FORM.Comments );
                stepAction.setActTimeStamp( DateFormat(now(), 'mm/dd/yyyy'));
                EntitySave(stepAction);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(22);
                stepAction.setNotes( FORM.Comments );
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setTermReqID( TermRequest.getTerminationRequestsID() );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);

                location("/#session.rootDir#/termination/scf/Step3-ExecuteTermination.cfm?TermReqID=#FORM.TermReqID#");
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep2 --->


<!--- SCFStep2 --->
<cfif url.SCFStep2 eq "reject">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                TermRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID );
                KronosQueries = CreateObject("component", session.rootDir & ".DatabaseQueries.Kronos");                
                Employee = KronosQueries.funcGetCurrentEmployees( TermRequest.getRosettaID() );
                Supervisor = KronosQueries.funcGetCurrentEmployeeByID( Employee.SupervisorIdNo );
                Rejector = Employee.FirstName & " " & Employee.LastName;
                RejectorDetails = "Termination step 2 rejected on #DateFormat(now(), 'm/d/yyyy')# by #Rejector#.  Rejector comments: #FORM.Comments#";
                StepActions = EntityLoad("StepActions", {TermReqID = FORM.TermReqID});
                Files = EntityLoad("FileLibrary", {TermReqID = FORM.TermReqID});
                for( i=1; i LTE ArrayLen(Files); i++){
                    EntityDelete(Files[i]);
                }
                for( i=1; i LTE ArrayLen(StepActions); i++){
                    EntityDelete(StepActions[i]);
                }                
                EntityDelete(TermRequest);           
                SupervisorEmail = "#Supervisor.UserAccount#" & "@scf.cc";                
                Alert = CreateObject("component", "#session.rootDir#.utilities.helperTools");
                Alert.AlertEmail( "Termination request denied by HR.", "#RejectorDetails#", 
                "EPAR_Termination@scf.cc", 
                "#SupervisorEmail#;bfrick@scf.cc");
                location("/#session.rootDir#/termination/Status.cfm", false);                
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep2 --->


<!--- SCFStep2 --->
<cfif url.SCFStep2 eq "upload">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                TermRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID);
                FileUpload = EntityNew("FileLibrary");
                FileUpload.setDateLoaded( DateFormat( now(), "mm/dd/yyyy") );
                FileUpload.setRosettaID( TermRequest.getRosettaID() );
                FileUpload.setTermReqID( FORM.TermReqID );
                FileUpload.setLoadedBy( Session.UserRosettaID );
                FileUpload.setFileTypeID( Form.FileTypeID );                
            </cfscript>
            <cffile action='upload' filefield='FileUpload' destination='#session.TerminationDocuments#' nameconflict='makeunique' />
            <cfscript>
                FileUpload.setFileName( '#cffile.ServerFile#' );
                EntitySave(FileUpload, true);
                location(CGI.HTTP_REFERER, false);
            </cfscript>                                 
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep2 --->


<!--- SCFStep3 --->
<cfif url.SCFStep3 eq "update_term_schedule">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                TermRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID);
                if( isDate(FORM.TermDate) ){
                    TermRequest.setTermDate( DateFormat(FORM.TermDate, 'mm/dd/yyyy'));
                }
                if( isDate(FORM.SysTermDate) ){
                    TermRequest.setSysTermDate( DateFormat(FORM.SysTermDate, 'mm/dd/yyyy'));
                }                
                EntitySave(TermRequest);
                
                TermSchedules = ORMExecuteQuery("FROM TerminationSchedule WHERE Complete = 0 AND TermReqID = ?", [ FORM.TermReqID ] );
                for( i=1; i<= ArrayLen(TermSchedules); i++){
                    ts = entityLoadByPK("TerminationSchedule", TermSchedules[i].getTermScheduleID());
                    if( DateFormat(ts.getTermDate(), 'mm/dd/yyyy') NEQ "" ){
                        ts.setTermDate( DateFormat(FORM.TermDate, 'mm/dd/yyyy') );
                    }
                    if( DateFormat(ts.getSysTermDate(), 'mm/dd/yyyy') NEQ "" ){
                        ts.setSysTermDate( DateFormat(FORM.SysTermDate, 'mm/dd/yyyy') );
                    }
                    EntitySave( ts );
                }
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep3 --->



<!--- SCFStep4 --->
<cfif url.SCFStep4 eq "update_finance_manager">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                termRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID);
                termRequest.setCostCode( FORM.CostCode );
                EntitySave(termRequest);
                
                stepAction = entityLoadByPK("StepActions", FORM.StepID);
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setNotes( "Cost code of #FORM.CostCode# added to employee's termination request." );
                stepAction.setActTimeStamp( DateFormat(now(), 'mm/dd/yyyy'));
                EntitySave(stepAction);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(25);
                stepAction.setNotes( "Advancing to Finance: Employee Termination." );
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setTermReqID( FORM.TermReqID );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep4 --->


<!--- SCFStep4 --->
<cfif url.SCFStep4 eq "update">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                writeDump(form);
                termRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID);
                EntitySave(termRequest);
                               
                stepAction = entityLoadByPK("StepActions", FORM.StepID);
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setNotes( "Finishing up finance side of termination" );
                stepAction.setActTimeStamp( DateFormat(now(), 'mm/dd/yyyy'));
                EntitySave(stepAction);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(26);
                stepAction.setNotes( "Advancing to Payroll: Employee Termination." );
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setTermReqID( FORM.TermReqID );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep4 --->


<!--- SCFStep5 --->
<cfif url.SCFStep5 eq "update">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                termRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID);
                EntitySave(termRequest);
                
                stepAction = entityLoadByPK("StepActions", FORM.StepID);
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setNotes( "Finishing up payroll side of termination" );
                stepAction.setActTimeStamp( DateFormat(now(), 'mm/dd/yyyy'));
                EntitySave(stepAction);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(27);
                stepAction.setNotes( "Advancing to Facilities: Access Control Update." );
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setTermReqID( FORM.TermReqID );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep5 --->


<!--- SCFStep6 --->
<cfif url.SCFStep6 eq "update">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                termRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID);
                EntitySave(termRequest);
                
                stepAction = entityLoadByPK("StepActions", FORM.StepID);
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setNotes( "Finishing up facilities side of termination"  );
                stepAction.setActTimeStamp( DateFormat(now(), 'mm/dd/yyyy'));
                EntitySave(stepAction);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(28);
                stepAction.setNotes( "Advancing to cleanup step." );
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setTermReqID( FORM.TermReqID );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- SCFStep6 --->



<!--- DisableUser --->
<cfif url.DisableUser eq "disable">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                try
                {
                	import models.*;
	                Users = createObject("component", "#session.rootDir#.utilities.Users").init();                
	                Rosetta = entityLoadByPK("RosettaStone", FORM.RosettaID);
	                Term = createObject("component", "#session.rootDir#.utilities.Termination").init();
	                Term.setUserAccount(Rosetta.getUserAccount());
	                Rosetta.setDisabled(1);                
	                Term.funcADDisable( Rosetta.getUserAccount() );//userid
                    if( !DirectoryExists( Term.ArchiveDir ) ){
                        DirectoryCreate( Term.ArchiveDir );
                        DirectoryCreate( Term.ArchiveDir & "\Email" );
                    }                    
	                Term.funcArchiveHomeFolder( Term.Home, Term.ArchiveDir);
	                Term.funcExportMailbox( Rosetta.getUserAccount() );//email sent to service desk
	                Term.funcArchiveAndDisable( Rosetta.getUserAccount() );//userid
	                EntitySave(Rosetta);
	                /*ad = CreateObject("component", "code_lib.SCF_ActiveDirectory");
	                ps = CreateObject("component", "code_lib.SCF_PowerShell");
	                dn = ad.getUserDNByAccountName( FORM.EmployeeUserAccount );
	                ad.replaceAttributesByDN( dn , 'userAccountControl=514');
	                ps.usePowerShell('
	                    $user = [ADSI]"LDAP://#dn#"
	                    $user.Invoke("setpassword", "Password10!")
	                ');*/ 
                }
                catch(Any e)
                {
                }
               
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- DisableUser --->



<!---*************************** NONSCF ************************************--->
<!---*************************** NONSCF ************************************--->
<!---*************************** NONSCF ************************************--->



<!--- NonSCFADAccount --->
<cfif url.NonSCFADAccount eq "extend">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                ps = CreateObject("component", "code_lib.SCF_PowerShell");
                ad = CreateObject("component", "code_lib.SCF_ActiveDirectory");
                ExpirationDate = DateFormat(dateAdd("m", 1, FORM.ExpirationDate), "mm/dd/yyyy");
                if( isDate(ExpirationDate) ){
                    EmployeeDN = ad.getUserDNByAccountName( Form.EmployeeUserAccount );
                    PowerShellDate = ps.usePowerShell("(Get-Date #DateFormat(ExpirationDate,'mm/dd/yyyy')#).ToFileTime()");
                    ad.replaceAttributesByDN( EmployeeDN, 'accountExpires=#PowerShellDate#');
                }
            </cfscript>            
        </cfcase>
    </cfswitch>
</cfif>
<!--- NonSCFADAccount --->



<!--- NonSCFADAccount --->
<cfif url.NonSCFADAccount eq "terminate">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                Rosetta = ORMExecuteQuery("FROM RosettaStone WHERE NonSCFMasterID = #FORM.NonSCFMasterID#")[1];
                NonSCFMaster = ORMExecuteQuery("FROM NonSCFMaster n WHERE n.NonSCFMasterID = #FORM.NonSCFMasterID#")[1];

                TermRequest = EntityNew("TerminationRequests");
                TermRequest.setTermDate( DateFormat(now(), 'mm/dd/yyyy') );
                TermRequest.setNonSCF( 1 );
                TermRequest.setRosettaID( Rosetta.getRosettaID() );
                TermRequest.setEmpStatusIDNo( -10133 );//end of temp assignment
                TermRequest.setEmpStatusReasonCode( 70 );
                TermRequest.setOrgCodeIDNo( 117 );
                TermRequest.setRehireElig( 1 );
                TermRequest.setTermTypeID( -10201 );//involuntary
                TermRequest.setCOBRAEndOfMonth( dateformat(dateadd('d',-1, dateadd('m',1,(Month(now()) & '/1/' & Year(now())))),'mm/dd/yyyy') );
                TermRequest.setSysTermDate(  DateFormat(now(), 'mm/dd/yyyy') );
                EntitySave(TermRequest, true);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(22);
                stepAction.setNotes( "Contractor Termination" );
                stepAction.setActionByID( 12441 );//bfrick
                stepAction.setTermReqID( TermRequest.getTerminationRequestsID() );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);
            </cfscript>            
        </cfcase>
    </cfswitch>
</cfif>
<!--- NonSCFADAccount --->



<!--- NonSCFStep1 --->
<cfif url.NonSCFStep1 eq "add">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                TermRequest = EntityNew("TerminationRequests");
                TermRequest.setTermDate( FORM.Term );
                TermRequest.setRosettaID( FORM.RosettaID );
                TermRequest.setEmpStatusIDNo( FORM.EmpStatusIDNo );
                TermRequest.setEmpStatusReasonCode( FORM.EmpStatusReasonCode );
                TermRequest.setOrgCodeIDNo( 117 );
                TermRequest.setRehireElig( 1 );
                TermRequest.setTermTypeID( FORM.TermTypeID );
                TermRequest.setCOBRAEndOfMonth( dateformat(dateadd('d',-1, dateadd('m',1,(Month(FORM.Term) & '/1/' & Year(FORM.Term)))),'mm/dd/yyyy') );
                TermRequest.setSysTermDate(  DateFormat(dateadd('ww',2, FORM.Term), 'mm/dd/yyyy') );
                EntitySave(TermRequest, true);
            </cfscript>
            
            <cfif FORM.FILEUPLOAD NEQ "">
                <cffile action='upload' filefield='FileUpload' destination='#FORM.Directory#' nameconflict='makeunique' />
                <cfscript>
                    AddFile = EntityNew("FileLibrary");
                    AddFile.setEmployeeID(FORM.RosettaID);
                    AddFile.setDateLoaded(now());
                    AddFile.setTermReqID( TermRequest.getTerminationRequestsID() );
                    AddFile.setFileName( '#cffile.ServerFile#' );
                    AddFile.setFileTypeID( Form.FileTypeID );
                    AddFile.setLoadedBy( Session.UserRosettaID );
                    EntitySave( AddFile, true );
                </cfscript>
            </cfif>
            
            <cfscript>            
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(18);
                stepAction.setTermReqID( TermRequest.getTerminationRequestsID() );
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setCreationTimeStamp( now() );
                stepAction.setNotes( replace(trim(FORM.Comments),"'","''","all") );
                EntitySave(stepAction, true);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(20);
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setTermReqID( TermRequest.getTerminationRequestsID() );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);

                EmployeeName = CreateObject("component", session.rootDir & ".DatabaseQueries.Kronos").funcGetCurrentEmployees( val(FORM.RosettaID) );
                EmployeeName = EmployeeName.FirstName & " " & EmployeeName.LastName;
                Session.StepConfirmation = 'The request for termination of the employee ';
                Session.StepConfirmation &= EmployeeName;
                Session.StepConfirmation &= " has been successfully submitted to HR.  Thank you for using E-PAR. <p>Initiate another request?  Click <a href='/#Session.RootDir#/termination/SCF/Step1-Request.cfm'>Here</a>";
                location("confirmation.cfm?Termination=True");
            </cfscript>
            
        </cfcase>
    </cfswitch>
</cfif>
<!--- NonSCFStep1 --->



<!--- NonSCFStep6 --->
<cfif url.NonSCFStep6 eq "update">
    <cfswitch expression="#CGI.REQUEST_METHOD#">
        <cfcase value="POST">
            <cfscript>
                import models.*;
                termRequest = entityLoadByPK("TerminationRequests", FORM.TermReqID);
                EntitySave(termRequest);
                
                stepAction = entityLoadByPK("StepActions", FORM.StepID);
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setNotes( "Finishing up facilities side of termination"  );
                stepAction.setActTimeStamp( DateFormat(now(), 'mm/dd/yyyy'));
                EntitySave(stepAction);
                
                stepAction = EntityNew("StepActions");
                stepAction.setStepsID(28);
                stepAction.setNotes( "Advancing to cleanup step." );
                stepAction.setActionByID( Session.UserRosettaID );
                stepAction.setTermReqID( FORM.TermReqID );
                stepAction.setCreationTimeStamp(now());
                EntitySave(stepAction, true);
            </cfscript>
        </cfcase>
    </cfswitch>
</cfif>
<!--- NonSCFStep6 --->

